//smwasm main.cpp
#include "main.h"

MainWindow *MainWin = NULL;

/* Entry point.
 */
int main(int argc, char **argv)
{
	atexit(onexit);
	gtk_init(&argc, &argv);
	
	//Create main window
	MainWin = new MainWindow("smw.smc");
	
	//Enter main loop
	gtk_main(); //main loop should never return
	return 0; //but compilers like it if we do this anyway
}

/* Program exit handler
 */
void onexit()
{
	if(MainWin) delete MainWin; MainWin = NULL;
}
